/*
 * MIT License
 *
 * Copyright (c) 2023 北京凯特伟业科技有限公司
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.je.common.base.office.vo;

import com.je.common.base.DynaBean;

import java.io.InputStream;
import java.util.*;

public class JeOfficeVo {
    /**
     * 名称
     */
    private String name;
    /**
     * 编码
     */
    private String code;
    /**
     * 文件
     */
    private String file;
    /**
     * 文件后缀
     */
    private String fileSuffix;
    /**
     * 文件的mini类型
     */
    private String fileContextType;
    /**
     * 文件大小
     */
    private Long fileSize;
    /**
     * 类型
     */
    private String type;
    /**
     * 返回类型
     */
    private String returnType;
    /**
     * 结果流
     */
    private InputStream inputStream;
    /**
     * 预览结果流
     */
    private InputStream previewStream;
    /**
     * 预览文件大小
     */
    private Long previewFileSize;
    /**
     * 预览类型
     */
    private String previewContextType;
    /**
     * 预览后缀
     */
    private String previewSuffix;
    private DynaBean docConfig=new DynaBean();
    /**
     * 请求
     */
    private HashMap<String,String> requestParams=new HashMap<>();
    /**
     * 输出文件名称
     */
    private String fileName;
    /**
     * 备注
     */
    private String bz;
    /**
     * 文件标题
     */
    private String title;
    /**
     * 数据源对象
     */
    private List<OfficeDataVo> officeDatas=new ArrayList<>();
    /**
     * 带值解析
     */
    private Map<String, List<DynaBean>> dzValues=new HashMap<>();
    /**
     * 处理word的VO对象
     */
    private JeWordVo jeWordVo=new JeWordVo();
    /**
     * 处理excel的VO对象
     */
    private JeExcelVo jeExcelVo=new JeExcelVo();
    /**
     * 当前操作word的Table的对象
     */
    private JeWordTableVo jeWordTableVo;
    private Set<String> jeWordRows=new HashSet<>();
    /**
     * 处理pdf的VO对象
     */
    private JePdfVo jePdfVo=new JePdfVo();
    private Boolean convertPdf=false;
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public HashMap<String, String> getRequestParams() {
        return requestParams;
    }

    public void setRequestParams(HashMap<String, String> requestParams) {
        this.requestParams = requestParams;
    }

    public List<OfficeDataVo> getOfficeDatas() {
        return officeDatas;
    }

    public void setOfficeDatas(List<OfficeDataVo> officeDatas) {
        this.officeDatas = officeDatas;
    }
    public OfficeDataVo getOfficeDataVo(String code){
        for(OfficeDataVo officeDataVo:officeDatas){
            if(code.equals(officeDataVo.getCode())){
                return officeDataVo;
            }
        }
        return null;
    }

    public JeWordVo getJeWordVo() {
        return jeWordVo;
    }

    public void setJeWordVo(JeWordVo jeWordVo) {
        this.jeWordVo = jeWordVo;
    }

    public JeExcelVo getJeExcelVo() {
        return jeExcelVo;
    }

    public void setJeExcelVo(JeExcelVo jeExcelVo) {
        this.jeExcelVo = jeExcelVo;
    }

    public JePdfVo getJePdfVo() {
        return jePdfVo;
    }

    public void setJePdfVo(JePdfVo jePdfVo) {
        this.jePdfVo = jePdfVo;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Map<String, List<DynaBean>> getDzValues() {
        return dzValues;
    }

    public void setDzValues(Map<String, List<DynaBean>> dzValues) {
        this.dzValues = dzValues;
    }

    public String getReturnType() {
        return returnType;
    }

    public void setReturnType(String returnType) {
        this.returnType = returnType;
    }

    public DynaBean getDocConfig() {
        return docConfig;
    }

    public void setDocConfig(DynaBean docConfig) {
        this.docConfig = docConfig;
    }

    public InputStream getInputStream() {
        return inputStream;
    }

    public void setInputStream(InputStream inputStream) {
        this.inputStream = inputStream;
    }

    public String getFileSuffix() {
        return fileSuffix;
    }

    public void setFileSuffix(String fileSuffix) {
        this.fileSuffix = fileSuffix;
    }

    public String getFileContextType() {
        return fileContextType;
    }

    public void setFileContextType(String fileContextType) {
        this.fileContextType = fileContextType;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public InputStream getPreviewStream() {
        return previewStream;
    }

    public void setPreviewStream(InputStream previewStream) {
        this.previewStream = previewStream;
    }

    public Long getPreviewFileSize() {
        return previewFileSize;
    }

    public void setPreviewFileSize(Long previewFileSize) {
        this.previewFileSize = previewFileSize;
    }

    public String getPreviewContextType() {
        return previewContextType;
    }

    public void setPreviewContextType(String previewContextType) {
        this.previewContextType = previewContextType;
    }

    public String getPreviewSuffix() {
        return previewSuffix;
    }

    public void setPreviewSuffix(String previewSuffix) {
        this.previewSuffix = previewSuffix;
    }

    public JeWordTableVo getJeWordTableVo() {
        return jeWordTableVo;
    }

    public void setJeWordTableVo(JeWordTableVo jeWordTableVo) {
        this.jeWordTableVo = jeWordTableVo;
    }

    public Set<String> getJeWordRows() {
        return jeWordRows;
    }

    public void setJeWordRows(Set<String> jeWordRows) {
        this.jeWordRows = jeWordRows;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Boolean getConvertPdf() {
        return convertPdf;
    }

    public void setConvertPdf(Boolean convertPdf) {
        this.convertPdf = convertPdf;
    }
}
